package com.aerotechnic.service.implementation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aerotechnic.dao.implementation.JobCardDao;
import com.aerotechnic.entities.JobCard;
import com.aerotechnic.service.interfaces.JobcardBoIn;

@Service("JobCardBo")
@Transactional
public class JobCardBo implements JobcardBoIn {
	
	@Autowired
	private JobCardDao jobCardDao;

	@Override
	public void save(JobCard myEntity) {
		// TODO Auto-generated method stub
		jobCardDao.save(myEntity);
		
	}

	@Override
	public void update(JobCard myEntity) {
		// TODO Auto-generated method stub
		jobCardDao.update(myEntity);
		
	}

	@Override
	public void delete(Long id) {
		// TODO Auto-generated method stub
		jobCardDao.delete(id);
	}

	@Override
	public JobCard findByID(Long id) {
		// TODO Auto-generated method stub
		return jobCardDao.findByID(id);
	}

	@Override
	public List<JobCard> findAll() {
		// TODO Auto-generated method stub
		return jobCardDao.findAll();
	}

	@Override
	public JobCard findByNumero(Long numero) {
		// TODO Auto-generated method stub
		return jobCardDao.findByNumero(numero);
	}

	@Override
	public List<JobCard> findByVisiteId(Long visiteId) {
		// TODO Auto-generated method stub
		return jobCardDao.findByVisiteId(visiteId);
	}

	@Override
	public List<JobCard> findUnstuckJBByVisiteId(Long visiteId) {
		// TODO Auto-generated method stub
		return jobCardDao.findUnstuckJBByVisiteId(visiteId);
	}

}
